package com.bobi.tfca.network.response

import com.google.gson.Gson
import java.time.LocalDateTime

class MessageResponse(
    var messageId: Long,
    var senderId: Int,
    var receiverId: Int,
    var content: String,
    var contentType: Int,
    var category: Int,
    var messageStatus: Int,
    var sendTime: String,
    var senderName: String,
    var receiverName: String,
    var groupId: Int,
    var contentId: Long,
    var isTimeVisible: Boolean,
    var senderPicture: String
) {

    // 空构造
    constructor() : this(0, 0, 0, "", 0, 0, 0, "", "", "", 0, 0, false, "")

    fun toJson(): String {
        val gson: Gson = Gson()
        return gson.toJson(this)
    }
}